package com.qianfeng.zw.meilishuo.adapter.itemview;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.jayqqaa12.abase.core.ItemView;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.qianfeng.zw.meilishuo.R;
import com.qianfeng.zw.meilishuo.bean.TwitterGoods;
import com.qianfeng.zw.meilishuo.utils.ImageLoaderHelper;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

/**
 * @作 用 :
 * @创 建 人: zhangwei
 * @日 期: 15/4/9 11:53
 * @修 改 人:
 * @日 期:
 */
@EViewGroup(R.layout.adapter_home_hotsell_layout)
public class HotSellViewHolder extends ItemView<TwitterGoods> {
    @ViewById(R.id.home_hotsell_img)
    ImageView img;
    @ViewById(R.id.home_hotsell_remark)
    TextView remarkTv;
    @ViewById(R.id.home_hotsell_price)
    TextView priceTv;
    @ViewById(R.id.home_hotsell_like)
    TextView likeTv;
    DisplayImageOptions options;
    public HotSellViewHolder(Context context) {
        super(context);
        options = ImageLoaderHelper.getInstance().getDefaultDisplayImageOptions();
    }

    @Override
    public void bind(TwitterGoods item) {
        super.bind(item);
        ImageLoader.getInstance().displayImage(item.getPicUrl(), img, options);
        remarkTv.setText(item.getRemark());
        priceTv.setText(item.getTitle());
        likeTv.setText(item.getCountLike());
    }

}


